package com.qiandw.entity.security;

import lombok.Data;

import javax.persistence.*;
import java.util.List;

/**
 * @author coxx
 */
@Data
@Entity
@Table(name = "sys_role")
public class Role {
    @Id
    private String id;
    private String name;
    private Integer status;
    private String description;
    @ManyToMany
    @JoinTable(name = "role_auth",
            joinColumns = {@JoinColumn(name = "sysRole_id")},
            inverseJoinColumns = {@JoinColumn(name = "sysAuthority_id")}
    )
    private List<Authority> authorities;
}
